package com.ruoyi.healthCard.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.healthCard.mapper.TBizPackageMapper;
import com.ruoyi.healthCard.domain.TBizPackage;
import com.ruoyi.healthCard.service.ITBizPackageService;

/**
 * 套餐Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-20
 */
@Service
public class TBizPackageServiceImpl implements ITBizPackageService 
{
    @Autowired
    private TBizPackageMapper tBizPackageMapper;

    /**
     * 查询套餐
     * 
     * @param packageId 套餐主键
     * @return 套餐
     */
    @Override
    public TBizPackage selectTBizPackageByPackageId(Long packageId)
    {
        return tBizPackageMapper.selectTBizPackageByPackageId(packageId);
    }

    /**
     * 查询套餐列表
     * 
     * @param tBizPackage 套餐
     * @return 套餐
     */
    @Override
    public List<TBizPackage> selectTBizPackageList(TBizPackage tBizPackage)
    {
        return tBizPackageMapper.selectTBizPackageList(tBizPackage);
    }

    /**
     * 新增套餐
     * 
     * @param tBizPackage 套餐
     * @return 结果
     */
    @Override
    public int insertTBizPackage(TBizPackage tBizPackage)
    {
        tBizPackage.setCreateTime(DateUtils.getNowDate());
        return tBizPackageMapper.insertTBizPackage(tBizPackage);
    }

    /**
     * 修改套餐
     * 
     * @param tBizPackage 套餐
     * @return 结果
     */
    @Override
    public int updateTBizPackage(TBizPackage tBizPackage)
    {
        return tBizPackageMapper.updateTBizPackage(tBizPackage);
    }

    /**
     * 批量删除套餐
     * 
     * @param packageIds 需要删除的套餐主键
     * @return 结果
     */
    @Override
    public int deleteTBizPackageByPackageIds(Long[] packageIds)
    {
        return tBizPackageMapper.deleteTBizPackageByPackageIds(packageIds);
    }

    /**
     * 删除套餐信息
     * 
     * @param packageId 套餐主键
     * @return 结果
     */
    @Override
    public int deleteTBizPackageByPackageId(Long packageId)
    {
        return tBizPackageMapper.deleteTBizPackageByPackageId(packageId);
    }
}
